#include "cGame.h"
#include <fstream>

cGame* cGame::getInstance()
{
	static cGame* s_game = new cGame();
	return s_game;
}

static const char* s_space = " ", *s_enter = "\n";

bool cGame::load(const std::string& path, const std::string& exe, const std::string& config){
	_path = path;
	_exe = exe;
	_config = config;
	std::ifstream ifile(_path + config);
	if (!ifile.is_open()){
		return false;
	}
	std::string  line;
	ifile >> _w;
	ifile >> _h;
	int e;
	ifile >> e;
	_eui = (euiType)e;
	ifile >> _isChatShown;
	ifile.close();
	return true;
}
